Auto merge of #3924 - koivunej:issue_3922, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 18 Apr 2017 04:26:49 +0000 (04:26 +0000)
committerbors <bors@rust-lang.org>
Tue, 18 Apr 2017 04:26:49 +0000 (04:26 +0000)
commit01d403f34d34b63815785cdac4391cc41df6280f
tree8806adcd630bdfd638a225768d6c043425281e1f
parent434e7a822c950eaf8488e3de08d605f8029f85c9
parentc9f86804efdce174e59e901a04dcb58f928ee63b
Auto merge of #3924 - koivunej:issue_3922, r=alexcrichton

Adjust submodule updating failure reporting

This PR changes output of cargo when updating a dependency fails because of it's submodules cannot be loaded. In my original example this was caused by submodule pointing to a revision which was deleted by force pushing. Fixes #3922.

Before:

```
$ cargo check
    Updating git repository `<foo-url>`
error: failed to load source for a dependency on `foo`
Caused by:
  Unable to update <foo-url>?rev=hash
To learn more, run the command again with --verbose.
```

After:

```
$ cargo check
    Updating git repository `<foo-url>`
error: failed to load source for a dependency on `foo`
Caused by:
  Unable to update <foo-url>?rev=hash
Caused by:
  Failed to update submodule `submodule`
To learn more, run the command again with --verbose.
```

`--verbose` showing an additional `[9/-3] object not found - no match for id (hash)` has not been changed.

@alexcrichton since we have this nice timezone difference there was no chance of mentoring so far but any comments/suggestions are highly welcome. I'll likely check back on this next week.